package com.android.newsreader;

import java.util.List;
import java.util.Vector;

/**
* Class for representing an RSS Feed
* 
* Sourced from:
*  http://www.ibm.com/developerworks/xml/tutorials/x-androidrss/section2.html
* 
*/
public class RSSFeed 
{
	private String mTitle = null;
	private String mPubDate = null;
	private int mItemCount = 0;
	private List<RSSItem> mItemList;
	
	
	public RSSFeed()
	{
		mItemList = new Vector(0); 
	}
	
	public int addItem(RSSItem item)
	{
		mItemList.add(item);
		mItemCount++;
		
		return mItemCount;
	}
	
	public RSSItem getItem(int location)
	{
		return mItemList.get(location);
	}
	
	public List getAllItems()
	{
		return mItemList;
	}
	
	public int getItemCount()
	{
		return mItemCount;
	}
	
	public void setTitle(String title)
	{
		mTitle = title;
	}
	
	public void setPubDate(String pubdate)
	{
		mPubDate = pubdate;
	}
	
	public String getTitle()
	{
		return mTitle;
	}
	
	public String getPubDate()
	{
		return mPubDate;
	}
	
}
